import { defineStore } from "pinia";
import { getSectionsAPI } from "@/apis/layout";
import {ref} from 'vue';

export const useCategoryStore = defineStore('category', ()=>{

  // 导航列表数据
  const sections = ref([])

  // 获取导航列表数据
  const getSections = async ()=>{
    const res = await getSectionsAPI();
    sections.value = res;
  }
  return {sections, getSections}
})
